#pragma once

#include "SourceCode/Renderer/RendererAPI.h"

namespace Hazal
{
	class CRenderCommand
	{
	public:
		inline void static Init()
		{
			s_RendererAPI->Init();
		}

		inline void static SetViewport(uint32_t unWidth, uint32_t unHeight)
		{
			HZ_CORE_ASSERT(s_RendererAPI, "Renderer API ptr is null!");
			s_RendererAPI->SetViewport(unWidth, unHeight);
		}

		inline void static SetClearColor(const glm::vec4& vecColor)
		{
			HZ_CORE_ASSERT(s_RendererAPI, "Renderer API ptr is null!");
			s_RendererAPI->SetClearColor(vecColor);
		}

		inline void static Clear()
		{
			HZ_CORE_ASSERT(s_RendererAPI, "Renderer API ptr is null!");
			s_RendererAPI->Clear();
		}

		inline void static DrawIndexed(Ref<CVertexArray>& pVertexArray, uint32_t unIdxCount = 0)
		{
			HZ_CORE_ASSERT(s_RendererAPI, "Renderer API ptr is null!");
			s_RendererAPI->DrawIndexed(pVertexArray, unIdxCount);
		}

	private:
		static CRendererAPI* s_RendererAPI;
	};
}
